import request from '@/utils/request'

// 查询安全常识目录列表
export function listknowledgeCatalog(query) {
  return request({
    url: '/system/knowledgeCatalog/list',
    method: 'get',
    params: query
  })
}

// 查询安全常识目录详细
export function getknowledgeCatalog(id) {
  return request({
    url: '/system/knowledgeCatalog/' + id,
    method: 'get'
  })
}

//查询安全目录的所属类别
export function getSortList(){
  return request({
    url: '/system/knowledgeCatalog/getSortList',
    method: 'get'
  })
}

// 新增安全常识目录
export function addknowledgeCatalog(data) {
  return request({
    url: '/system/knowledgeCatalog',
    method: 'post',
    data: data
  })
}

// 修改安全常识目录
export function updateknowledgeCatalog(data) {
  return request({
    url: '/system/knowledgeCatalog',
    method: 'put',
    data: data
  })
}

// 删除安全常识目录
export function delknowledgeCatalog(id) {
  return request({
    url: '/system/knowledgeCatalog/' + id,
    method: 'delete'
  })
}

// 导出安全常识目录
export function exportknowledgeCatalog(query) {
  return request({
    url: '/system/knowledgeCatalog/export',
    method: 'get',
    params: query
  })
}